package springboot_select_insert.serviceimpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import springboot_select_insert.dao.ChaDao;
import springboot_select_insert.entity.ChaEntity;
import springboot_select_insert.service.ChaService;

@Service
public class ChaServiceImpl implements ChaService{
	@Autowired
	private ChaDao chaDao;
	@Override
	public List<ChaEntity> selectService() {
		return chaDao.selectdao();
	}
	@Override
	public boolean insertService(ChaEntity chaEntity) {
		boolean flag=false;
		try {
			chaDao.insertdao(chaEntity);
			flag=true;
		} catch (Exception e) {
			e.printStackTrace();
		}
		return flag;
		
	}
	
}
